projects
/
ostree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
134283a
)
tests: Ensure we quote grep pattern
author
Colin Walters
<walters@verbum.org>
Sun, 18 Dec 2011 22:35:30 +0000
(17:35 -0500)
committer
Colin Walters
<walters@verbum.org>
Sun, 18 Dec 2011 22:35:30 +0000
(17:35 -0500)
Otherwise we fail if the pattern starts with -
tests/libtest.sh
patch
|
blob
|
history
diff --git
a/tests/libtest.sh
b/tests/libtest.sh
index 04e206bf07981bfe52522fe6ccfea7076947fb85..b6e57a1e91b81dfa32bd18b3a5ecfd19c2cc5098 100644
(file)
--- a/
tests/libtest.sh
+++ b/
tests/libtest.sh
@@
-55,7
+55,7
@@
assert_not_has_file () {
}
assert_file_has_content () {
- if ! grep -q "$2" "$1"; then
+ if ! grep -q
-e
"$2" "$1"; then
echo 1>&2 "File '$1' doesn't match regexp '$2'"; exit 1
fi
}